/*
 * @Description: 派生类
 * @Author: rendc
 * @Date: 2025-08-04 11:30:14
 * @LastEditors: rendc
 * @LastEditTime: 2025-08-04 11:34:58
 */

public class Derived extends Base {
  int n = 2; // 子类新增一个父类的同名成员
  int v = 20;

  @Override
  public void show() {
    System.out.println("Derived:n" + n);
    System.out.println("Derived:v" + v);
  }

  public void disp() {
    System.out.println("Derived:v" + v);
  }

}